package com.ruoyi.asset.mapper;

import java.util.List;
import com.ruoyi.asset.domain.AssetStockDetail;

/**
 * 盘点记录Mapper接口
 * 
 * @author asset
 * @date 2024-12-25
 */
public interface AssetStockDetailMapper 
{

    /**
     * 查询未盘点的设备数量
     *
     * @param stockId 盘点任务主键
     * @return 盘点记录
     */
    public int countUnStockAsset(Long stockId);

    /**
     * 查询盘点记录
     * 
     * @param id 盘点记录主键
     * @return 盘点记录
     */
    public AssetStockDetail selectAssetStockDetailById(Long id);


    /**
     * 查询设备最新的盘点记录
     *
     * @param assetId 设备主键
     * @return 盘点记录
     */
    public AssetStockDetail selectAssetStockDetailByAssetId(Long assetId);

    /**
     * 查询盘点记录列表
     * 
     * @param assetStockDetail 盘点记录
     * @return 盘点记录集合
     */
    public List<AssetStockDetail> selectAssetStockDetailList(AssetStockDetail assetStockDetail);

    /**
     * 将资产复制到盘点明细表
     * @param stockId
     * @return
     */
    public int copyAssetStockDetail(Long stockId);

    /**
     * 将盘点结果同步到资产信息
     * @param stockId
     * @return
     */
    public int copyAssetStockResult(Long stockId);

    /**
     * 新增盘点记录
     * 
     * @param assetStockDetail 盘点记录
     * @return 结果
     */
    public int insertAssetStockDetail(AssetStockDetail assetStockDetail);

    /**
     * 修改盘点记录
     * 
     * @param assetStockDetail 盘点记录
     * @return 结果
     */
    public int updateAssetStockDetail(AssetStockDetail assetStockDetail);

    /**
     * 删除盘点记录
     * 
     * @param id 盘点记录主键
     * @return 结果
     */
    public int deleteAssetStockDetailById(Long id);

    /**
     * 批量删除盘点记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAssetStockDetailByIds(Long[] ids);
}
